1. Field of the Invention
This invention relates to data storage and, more particularly, to recoverable single-phase logging using validation indicators.
2. Description of the Related Art
Modern business operations frequently rely upon continual access to large amount of data. Rapid recovery of access to data and preservation of data correctness in cases of access interruption caused by hardware, software or operational failures may be extremely important. Some common examples of such failures are power outages, storage interconnect failures, hardware or software malfunctions that results in a system crash, and other disasters. Various techniques may be used after such disasters to bring data back into accessible and consistent state as rapidly as possible. With ever-growing amounts of data, operations that enhance data availability and reliability, such as backing up, restoring, logging, mirroring, and synchronizing can be of significant importance.
One example of an operation that may enhance data availability and reliability is the use of journals or logs. Recoverable logs are sometimes implemented to temporarily, but persistently, store, or stage, copies of data in a format that may be optimal for writing, but may be suboptimal for reading, before they have been written to more permanent, regular data storage where read performance may be important. Using logs in this way may allow completing a data write as soon as the usually faster log write is completed, These copies may be used to repair, replace, or synchronize the data storage sources in the event of a system or storage failure.
Recoverable logs are commonly implemented using a two-phase write operation that may require the writing of an additional “trailer” record, “committing” the write. The trailer record may be written to the log only after it is certain that the data being logged has been completely written to the log. The trailer may contain pertinent information about a previous log write. In other words, a second block may be written recording both the fact that the individual data blocks were correctly committed to storage, and possibly where they were stored. This approach may increase the latency of the entire write operation because it may have to wait for the log write of the regular data to be completed before the trailer record is written.
Another common logging approach is to replace part of each data block with an informational header that identifies the block as part of the complete log entry. This second approach may require storing the data displaced from each block to make room for the informational header into one or more additional blocks that must also be committed to storage. Copying displaced data to create the log records usually requires creation of a separate copy of data, which may incur the overhead of allocating, mapping and copying of blocks of computer memory. Ensuring that this displaced data is merged back into the original data block upon reading the log entry may be require additional memory mapping operations.